package com.journal.book.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.journal.common.annotation.Excel;
import com.journal.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 页面访问记录对象 page_visit
 *
 * @author mobin
 * @date 2025-01-XX
 */
public class PageVisit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增主键 */
    private Long id;

    /** 页面路径 */
    @Excel(name = "页面路径")
    private String pagePath;

    /** 页面名称 */
    @Excel(name = "页面名称")
    private String pageName;

    /** 访问次数 */
    @Excel(name = "访问次数")
    private Long visitCount;

    /** 最后访问时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最后访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date lastVisitTime;

    /** 用户唯一标识（openid或unionid） */
    @Excel(name = "用户标识")
    private String userIdentifier;

    /** IP地址 */
    @Excel(name = "IP地址")
    private String ipAddress;

    /** IP所在地区 */
    @Excel(name = "IP所在地区")
    private String location;

    /** 手机品牌 */
    @Excel(name = "手机品牌")
    private String brand;

    /** 设备型号 */
    @Excel(name = "设备型号")
    private String model;

    /** 操作系统名称 */
    @Excel(name = "操作系统")
    private String osName;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setPagePath(String pagePath)
    {
        this.pagePath = pagePath;
    }

    public String getPagePath()
    {
        return pagePath;
    }

    public void setPageName(String pageName)
    {
        this.pageName = pageName;
    }

    public String getPageName()
    {
        return pageName;
    }

    public void setVisitCount(Long visitCount)
    {
        this.visitCount = visitCount;
    }

    public Long getVisitCount()
    {
        return visitCount;
    }

    public void setLastVisitTime(Date lastVisitTime)
    {
        this.lastVisitTime = lastVisitTime;
    }

    public Date getLastVisitTime()
    {
        return lastVisitTime;
    }

    public void setUserIdentifier(String userIdentifier)
    {
        this.userIdentifier = userIdentifier;
    }

    public String getUserIdentifier()
    {
        return userIdentifier;
    }

    public void setIpAddress(String ipAddress)
    {
        this.ipAddress = ipAddress;
    }

    public String getIpAddress()
    {
        return ipAddress;
    }

    public void setLocation(String location)
    {
        this.location = location;
    }

    public String getLocation()
    {
        return location;
    }

    public void setBrand(String brand)
    {
        this.brand = brand;
    }

    public String getBrand()
    {
        return brand;
    }

    public void setModel(String model)
    {
        this.model = model;
    }

    public String getModel()
    {
        return model;
    }

    public void setOsName(String osName)
    {
        this.osName = osName;
    }

    public String getOsName()
    {
        return osName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pagePath", getPagePath())
            .append("pageName", getPageName())
            .append("visitCount", getVisitCount())
            .append("lastVisitTime", getLastVisitTime())
            .append("userIdentifier", getUserIdentifier())
            .append("ipAddress", getIpAddress())
            .append("location", getLocation())
            .append("brand", getBrand())
            .append("model", getModel())
            .append("osName", getOsName())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .toString();
    }
}

